 /**
 * DISCLIMER: 
 * this library is an opensource, feel free to edit or redistribute it
 * but use it with you own risk
 * 
 * ktutnik
 */
package org.ticlib.task
{
	public class SequenceTask extends MultiTask
	{
		public function SequenceTask()
		{
			super();
		}
		
		override public function execute():void
		{
			initialize();
			if(tasks.length > 0)
			{
				var task:Task = tasks[executedCount] as Task;
				task.execute();				
			}
		}
		
		override protected function executeNext():void
		{
			if(tasks.length > 0)
			{
				var task:Task = tasks[executedCount] as Task;
				task.execute();				
			}
		}
	}
}